#ifndef _MESSAGE_H_
#define _MESSAGE_H_

#include <string>
#include <set>
#include "folder.h"

class Folder;

class Message {
public:
    Message(const std::string &cont = ""):
        contents(cont) {}
    Message(const Message&);
    Message& operator=(const Message&);
    ~Message();
    void save(Folder&);
    void remove(Folder&);
private:
    std::string contents;
    std::set<Folder*> folders;
    void put_Msg_in_Folders(const std::set<Folder*>&);
    void remove_Msg_from_Folders();
};

class Folder {
public:
    void addMsg(const Message&);
    void remMsg(const Message&);
};

#endif
